ELEMENTS

Editing
  • account_tree
  • bug_report

<object>

리소스의 유형에 따라 이미지 또는 탐색 가능한 자식으로 처리되는 외부 리소스를 나타낼 수 있다.

  • 콘텐츠 분류

    EMBEDDED CONTENT, FLOW CONTENT, FORM ASSOCIATED, PALPABLE CONTENT, PHRASING CONTENT

    특이하게도 <object> 요소는 HTMLFormElement.prototype.elements, HTMLFieldsetElement.prototype.elements에서 컬렉션(collection)으로 참조된다.

  • 허용된 부모 요소 또는 위치

    EMBEDDED CONTENT

    임베디드 콘텐츠(embedded-content)가 예상되는 위치

  • 콘텐츠 모델

  • 태그 생략

    시작 태그, 종료 태그 모두 작성

  • DOM Interface

    HTMLObjectElement

    [Exposed=Window]
    interface HTMLObjectElement : HTMLElement {
      [HTMLConstructor] constructor();
    
      [CEReactions] attribute USVString data;
      [CEReactions] attribute DOMString type;
      [CEReactions] attribute DOMString name;
      readonly attribute HTMLFormElement? form;
      [CEReactions] attribute DOMString width;
      [CEReactions] attribute DOMString height;
      readonly attribute Document? contentDocument;
      readonly attribute WindowProxy? contentWindow;
      Document? getSVGDocument();
    
      readonly attribute boolean willValidate;
      readonly attribute ValidityState validity;
      readonly attribute DOMString validationMessage;
      boolean checkValidity();
      boolean reportValidity();
      undefined setCustomValidity(DOMString error);
    
      // also has obsolete members
    };

구문

마크업 형식
<object></object>
Example

애트리뷰트

data non-empty URL potentially surrounded by spaces

연결되는 리소스의 URL을 지정한다.

About Non-empty URL potentially surrounded by spaces

문자열에서 선행 및 후행 ASCII 공백을 제거한 후 유효한 비공백 URL인 경우 문자열은 공백으로 둘러싸일 수 있는 유효한 비공백 URL을 나타낸다.

type MIME type string

가장 많이 사용되는 대표적인 text/html, text/css, text/javascript가 있고 그외의 유형은 Media Types를 참고하라.

About MIME type string

미디어 유형 토큰(token) 생성과 일치하는 문자열이다. 매개변수가 포함될 수 있다. 매개변수가 없는 유효한 MIME 형식 문자열은 U+003B(;)을 포함하지 않은 MIME 형식 문자열이다.

사용되는 키워드

text/css

*.css와 같이 스타일시트(stylesheet) 파일을 나타내는 MIME 유형이다.

text/html

*.html, *.htm 파일을 나타내는 MIME 유형이다.

text/javascript

*.js 파일을 나타내는 MIME 유형이다.

name navigable target names or keywords

요소를 식별할 수 있는 값을 지정한다.

form 

<form> 요소와 연결할 때 연결하고자 하는 <form> 요소의 id를 지정한다.

width dimension attribute

요소의 시각적 가로 크기를 CSS의 픽셀(pixels)을 기본 단위로 해서 지정한다. 음수가 아닌 유효한 정수여야 한다.

height dimension attribute

요소의 시각적 세로 크기를 CSS의 픽셀(pixels)을 기본 단위로 해서 지정한다. 음수가 아닌 유효한 정수여야 한다.

글로벌 애트리뷰트

일부 글로벌 애트리뷰트는 이 요소에서 사용되지 않을 수 있다.

글로벌 이벤트 핸들러

일부 글로벌 이벤트 핸들러는 이 요소에서 사용되지 않을 수 있다. 이벤트 등록은 자바스크립트 사용을 권장한다.

버전 명세

HTML Standard
#the-object-element

지원 웹브라우저